// 统一管理用户相关的接口
import request from "@/utils/request";
import { CreateParams, CreateResponseData, GetListResponseData } from "./type";
// 统一管理接口
enum API {
    CREATE_URL = "/need/tag/createTag",
    GETLIST_URL = "/notNeed/tag/getTagList",
}

// 创建词条的接口
export const reqCreateTag = (data: CreateParams) => {
    return request.post<any, CreateResponseData>(API.CREATE_URL, data);
};

// 通过内容查找词条的接口
export const reqTagList = (tagName: string, signal: AbortSignal = new AbortController().signal) => {
    return request.get<any, GetListResponseData>(API.GETLIST_URL + "/" + tagName, { signal });
};
